/***********************************************************************
 * Module:  LieuHebergement.java
 * Author:  Lionel
 * Purpose: Defines the Class LieuHebergement
 ***********************************************************************/
package hebergement;

import java.util.ArrayList;

/** @pdOid f09be1bb-e38f-41eb-9c42-bc8a48c2553f */
public class LieuHebergement {

    /** @pdOid d3297aca-3694-41ba-aacd-c319427813f2 */
    private int idLieu;
    
    /** @pdOid 9c65ee29-29ea-4511-961c-48a70eb537f6 */
    private String type;
    /** @pdOid bad587ea-7a0c-4645-8d3f-dc92093a1aba */
    private String libelleLieu;
    /** @pdOid 73205b69-0465-4d20-8147-785c65ee998d */
    private int nbEtoiles;
    /** @pdOid 62225886-5977-40ba-8798-103eeecc204d */
    private int nbPlaceRestante;
    /** @pdOid 21fbaca6-98ef-4f86-b83c-6207690304bf */
    private int pourJury;
    /** @pdRoleInfo migr=no name=ServiceOffert assc=offert mult=0..* side=A */
    public String offre;
    /** @pdRoleInfo migr=no name=Vip assc=logement mult=1..* side=A */
    public String Contient;

    public LieuHebergement(int idLieu, String type, String libelleLieu, int nbEtoiles, int nbPlaceRestante, int pourJury,String contient) {
        this.idLieu = idLieu;
        this.type = type;
        this.libelleLieu = libelleLieu;
        this.nbEtoiles = nbEtoiles;
        this.nbPlaceRestante = nbPlaceRestante;
        this.pourJury = pourJury;
        this.Contient = contient;

    }

    /** @pdOid 3932ce2c-fc4c-4e80-a25e-9c216338642a */
    public int getIdLieu() {
        return idLieu;
    }

    /** @pdOid bfcb036d-77f6-4696-8a3a-0380c3b4b0a6 */
    public String getType() {
        return type;
    }

    /** @pdOid 74a60820-3865-4ea1-a067-738676e81fe2 */
    public String getLibelleLieu() {
        return libelleLieu;
    }

    /** @pdOid 1a54af78-1e96-4510-b75f-f1c34c22e921 */
    public int getNbEtoiles() {
        return nbEtoiles;
    }

    /** @pdOid 0fec1887-e172-4095-8b8c-e386d8a340b6 */
    public int getNbPlaceRestante() {
        return nbPlaceRestante;
    }

    /** @pdOid 188f213b-1f3e-48e3-a6cd-c3f6f21ef9c0 */
    public int getPourJury() {
        return pourJury;
    }

    /** @pdOid ede9ced1-c9dd-4e8e-a04e-67d12d9cf655 */
    public LieuHebergement recupereLieuJury() {
        // TODO: implement
        return null;
    }

    /** @param newNbPlaceRestante
     * @pdOid e8b54d81-0ca2-4958-a1a0-89639e35ff3a */
    public void setNbPlaceRestante(int newNbPlaceRestante) {
        nbPlaceRestante = newNbPlaceRestante;
    }

    public void setSetter(Object valu, int col) {
        
            
            if (col == 0) {
                this.setIdLieu(Integer.parseInt(valu.toString()));
            }
            if(col == 1){
                this.setType(valu.toString());
            }
            if (col == 2) {
                this.setLibelleLieu(valu.toString());
            }
            if (col == 2) {
                this.setServiceOffer(valu.toString());
            }
            if (col == 3) {
                this.setNbEtoiles(Integer.parseInt(valu.toString()));
            }
            if(col == 4) {
                this.setNbPlaceRestante(Integer.parseInt(valu.toString()));
            }
            if(col == 5){
                this.setContient(valu.toString());
            }
            if(col == 6) {
                this.setPourJury(Integer.parseInt(valu.toString()));
            }

        
    }

    public Object getGetter(int col) {
        if (col == 0) {
            return this.getIdLieu();
        }
        if (col == 1) {
            return this.getType();
        }
        if (col == 2) {
            return this.getLibelleLieu();
        }
        if (col == 3) {
            return this.getNbEtoiles();
        }
        if(col == 4){
            return this.getNbPlaceRestante();
        }
        if(col == 5){
            return this.getContient();
        }
        if (col == 6){
            return this.getPourJury();
        }
        return null;
    }

    public void setContient(String contient) {
        this.Contient = contient;
    }

    public void setIdLieu(int idLieu) {
        this.idLieu = idLieu;
    }

    public void setLibelleLieu(String libelleLieu) {
        this.libelleLieu = libelleLieu;
    }

    public void setNbEtoiles(int nbEtoiles) {
        this.nbEtoiles = nbEtoiles;
    }

    public void setOffre(String offre) {
        this.offre = offre;
    }

    public void setPourJury(int pourJury) {
        this.pourJury = pourJury;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getContient() {
        return Contient;
    }

    public String getOffre() {
        return offre;
    }

    private void setServiceOffer(String offre) {
        this.offre=offre;
    }

    @Override
    public String toString() {
        return "LieuHebergement{" + "idLieu=" + idLieu + ",type=" + type + ",libelleLieu=" + libelleLieu + ",nbEtoiles=" + nbEtoiles + ",nbPlaceRestante=" + nbPlaceRestante + ",pourJury=" + pourJury + ",offre=" + offre+ '}';
    }

}
